﻿using System.Data.Entity.ModelConfiguration;
using Zeus.Biz.MySql.EF.Model;

namespace Zeus.Biz.MySql.EF.Config
{
    public class OrderConfiguration : EntityTypeConfiguration<Order>
    {
        public OrderConfiguration()
        {
            Property(d => d.Id).IsRequired();
            Property(d => d.OrderNumber).IsRequired();

            // Table & Column Mappings
            this.ToTable("tbOrder");
            this.Property(t => t.OrderNumber).HasColumnName("ORDER_NUMBER");
            this.Property(t => t.CustomerId).HasColumnName("CUSTOMER_ID");
        }
    }
}
